var option2019 = {
    title: {
        text: '2019代码新增统计图'
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'cross',
            label: {
                backgroundColor: '#6a7985'
            }
        }
    },
    legend: {
        data: ['cpp', 'java', 'js', 'py']
    },
    toolbox: {},
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: [{
        type: 'category',
        boundaryGap: false,
        data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '11', '12']
    }],
    yAxis: [{
        type: 'value',
        max: 20000,
        axisLabel: {
            interval: 5000,
        },
    }],
    series: [{
            "name": "cpp",
            "type": "line",
            "stack": "总量",
            "areaStyle": {},
            "emphasis": {
                "focus": "series"
            },
            "data": [
                1221,
                3875,
                3837,
                2295,
                3134,
                5681,
                5779,
                1066,
                10650,
                5286,
                6278,
                2487
            ]
        },
        {
            "name": "java",
            "type": "line",
            "stack": "总量",
            "areaStyle": {},
            "emphasis": {
                "focus": "series"
            },
            "data": [
                401,
                29,
                0,
                6549,
                292,
                0,
                0,
                0,
                146,
                0,
                0,
                3
            ]
        },
        {
            "name": "py",
            "type": "line",
            "stack": "总量",
            "areaStyle": {},
            "emphasis": {
                "focus": "series"
            },
            "data": [
                0,
                1627,
                0,
                0,
                0,
                0,
                7,
                63,
                0,
                0,
                0,
                0
            ]
        },
        {
            "name": "js",
            "type": "line",
            "stack": "总量",
            "areaStyle": {},
            "emphasis": {
                "focus": "series"
            },
            "data": [
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0
            ]
        }
    ]
};

var chartDom = document.getElementById('2019');
var myChart = echarts.init(chartDom, 'dark');
option2019 && myChart.setOption(option2019);